package com.own.component.util.aviator.util;

import com.googlecode.aviator.AviatorEvaluator;

import java.util.HashMap;

/**
 * TestUtil
 *
 * @author chenxueli
 * @date 2023-10-28 15:10:00
 */
public class TestUtil {


    public static void main(String[] args) {
        var expression = "a + b > 100 && c == true";
        var map = new HashMap<String, Object>();
        map.put("a", 50L);
        map.put("b", 50.1);
        map.put("c", true);
        var result = AviatorEvaluator.execute(expression, map);
        System.out.println(result);
    }

}
